﻿namespace Microsoft.Extensions.DependencyInjection
{
    public static class AutoMapperExtension
    {
        /// <summary>
        /// 天AutoMapper
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="serviceDescriptors"></param>
        /// <returns></returns>
        public static IServiceCollection AddAutoMapper<T>(this IServiceCollection serviceDescriptors)
        {
            serviceDescriptors.AddAutoMapper(typeof(T));
            return serviceDescriptors;
        }
    }
}
